<?

class feedCreator
{
    function get_feedItems(){
        $connect = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
        $query = $connect->query("SELECT id, title, thumb, summary, category, time FROM ".$prefix."posts WHERE draft='0' ORDER BY time DESC");
        while($row = $query->fetch_object()){

            $this->feedItems[] = array(
                "id" => $row->id,
                "title" => $row->title,
                "thumb" => $row->thumb,
                "summary" => $row->summary,
                "category" => $row->category,
                "time" => date('r',strtotime($row->time))
            );

        }
        return $this->feedItems;
        $query->close();
        $connect->close();
    }
}

?>
